DEVTOOLS = /Users/lgm/work/src/devtools

JAVAC = javac
JAVAC_FLAGS = -sourcepath . -cp $(DEVTOOLS)/java-cup-11a-runtime.jar:$(DEVTOOLS)/java-cup-11a.jar:$(DEVTOOLS)/JFlex/lib:$(DEVTOOLS)/jaxb/lib

JAVA = java
JAVA_FLAGS = -cp $(DEVTOOLS)/java-cup-11a-runtime.jar:$(DEVTOOLS)/java-cup-11a.jar:$(DEVTOOLS)/JLex.jar:$(DEVTOOLS)/JFlex/lib:$(DEVTOOLS)/jaxb/lib

CUP = java_cup.Main
CUPFLAGS = -nopositions -expect 100

JLEX = JLex.Main

LATEX = latex
DVIPS = dvips

all: test paratrope.ps

test: absyn com/biosimilarity/reflection/model/paratrope/Yylex.class com/biosimilarity/reflection/model/paratrope/PrettyPrinter.class com/biosimilarity/reflection/model/paratrope/Test.class com/biosimilarity/reflection/model/paratrope/ComposVisitor.class com/biosimilarity/reflection/model/paratrope/AbstractVisitor.class com/biosimilarity/reflection/model/paratrope/FoldVisitor.class com/biosimilarity/reflection/model/paratrope/AllVisitor.class com/biosimilarity/reflection/model/paratrope/parser.class com/biosimilarity/reflection/model/paratrope/sym.class com/biosimilarity/reflection/model/paratrope/Test.class

.PHONY: absyn

%.class: %.java
	${JAVAC} ${JAVAC_FLAGS} $^

absyn: com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExpr.java com/biosimilarity/reflection/model/paratrope/Absyn/Composition.java com/biosimilarity/reflection/model/paratrope/Absyn/Reception.java com/biosimilarity/reflection/model/paratrope/Absyn/Transmission.java com/biosimilarity/reflection/model/paratrope/Absyn/Transcription.java com/biosimilarity/reflection/model/paratrope/Absyn/Termination.java com/biosimilarity/reflection/model/paratrope/Absyn/Abstraction.java com/biosimilarity/reflection/model/paratrope/Absyn/Suspension.java com/biosimilarity/reflection/model/paratrope/Absyn/Concretion.java com/biosimilarity/reflection/model/paratrope/Absyn/Provision.java com/biosimilarity/reflection/model/paratrope/Absyn/Nominal.java com/biosimilarity/reflection/model/paratrope/Absyn/AtomLiteral.java com/biosimilarity/reflection/model/paratrope/Absyn/Encoding.java com/biosimilarity/reflection/model/paratrope/Absyn/Formals.java com/biosimilarity/reflection/model/paratrope/Absyn/Obligation.java com/biosimilarity/reflection/model/paratrope/Absyn/Actuals.java com/biosimilarity/reflection/model/paratrope/Absyn/Remittance.java com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExprPlus.java com/biosimilarity/reflection/model/paratrope/Absyn/Value.java com/biosimilarity/reflection/model/paratrope/Absyn/Variable.java com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExprPlus.java com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExpr.java com/biosimilarity/reflection/model/paratrope/Absyn/ListNominal.java
	${JAVAC} ${JAVAC_FLAGS} $^

com/biosimilarity/reflection/model/paratrope/Yylex.java: com/biosimilarity/reflection/model/paratrope/Yylex
	${JAVA} ${JAVA_FLAGS} ${JLEX} com/biosimilarity/reflection/model/paratrope/Yylex

com/biosimilarity/reflection/model/paratrope/sym.java com/biosimilarity/reflection/model/paratrope/parser.java: com/biosimilarity/reflection/model/paratrope/paratrope.cup
	${JAVA} ${JAVA_FLAGS} ${CUP} ${CUPFLAGS} com/biosimilarity/reflection/model/paratrope/paratrope.cup
	mv sym.java parser.java com/biosimilarity/reflection/model/paratrope/

com/biosimilarity/reflection/model/paratrope/Yylex.class: com/biosimilarity/reflection/model/paratrope/Yylex.java com/biosimilarity/reflection/model/paratrope/sym.java

com/biosimilarity/reflection/model/paratrope/sym.class: com/biosimilarity/reflection/model/paratrope/sym.java

com/biosimilarity/reflection/model/paratrope/parser.class: com/biosimilarity/reflection/model/paratrope/parser.java com/biosimilarity/reflection/model/paratrope/sym.java

com/biosimilarity/reflection/model/paratrope/PrettyPrinter.class: com/biosimilarity/reflection/model/paratrope/PrettyPrinter.java

paratrope.dvi: paratrope.tex
	${LATEX} paratrope.tex

paratrope.ps: paratrope.dvi
	${DVIPS} paratrope.dvi -o paratrope.ps

clean:
	 rm -f com/biosimilarity/reflection/model/paratrope/Absyn/*.class com/biosimilarity/reflection/model/paratrope/*.class
	 rm -f .dvi paratrope.aux paratrope.log paratrope.ps  *.class

vclean:
	 rm -f com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExpr.java com/biosimilarity/reflection/model/paratrope/Absyn/Composition.java com/biosimilarity/reflection/model/paratrope/Absyn/Reception.java com/biosimilarity/reflection/model/paratrope/Absyn/Transmission.java com/biosimilarity/reflection/model/paratrope/Absyn/Transcription.java com/biosimilarity/reflection/model/paratrope/Absyn/Termination.java com/biosimilarity/reflection/model/paratrope/Absyn/Abstraction.java com/biosimilarity/reflection/model/paratrope/Absyn/Suspension.java com/biosimilarity/reflection/model/paratrope/Absyn/Concretion.java com/biosimilarity/reflection/model/paratrope/Absyn/Provision.java com/biosimilarity/reflection/model/paratrope/Absyn/Nominal.java com/biosimilarity/reflection/model/paratrope/Absyn/AtomLiteral.java com/biosimilarity/reflection/model/paratrope/Absyn/Encoding.java com/biosimilarity/reflection/model/paratrope/Absyn/Formals.java com/biosimilarity/reflection/model/paratrope/Absyn/Obligation.java com/biosimilarity/reflection/model/paratrope/Absyn/Actuals.java com/biosimilarity/reflection/model/paratrope/Absyn/Remittance.java com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExprPlus.java com/biosimilarity/reflection/model/paratrope/Absyn/Value.java com/biosimilarity/reflection/model/paratrope/Absyn/Variable.java com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExprPlus.java com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExpr.java com/biosimilarity/reflection/model/paratrope/Absyn/ListNominal.java com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExpr.class com/biosimilarity/reflection/model/paratrope/Absyn/Composition.class com/biosimilarity/reflection/model/paratrope/Absyn/Reception.class com/biosimilarity/reflection/model/paratrope/Absyn/Transmission.class com/biosimilarity/reflection/model/paratrope/Absyn/Transcription.class com/biosimilarity/reflection/model/paratrope/Absyn/Termination.class com/biosimilarity/reflection/model/paratrope/Absyn/Abstraction.class com/biosimilarity/reflection/model/paratrope/Absyn/Suspension.class com/biosimilarity/reflection/model/paratrope/Absyn/Concretion.class com/biosimilarity/reflection/model/paratrope/Absyn/Provision.class com/biosimilarity/reflection/model/paratrope/Absyn/Nominal.class com/biosimilarity/reflection/model/paratrope/Absyn/AtomLiteral.class com/biosimilarity/reflection/model/paratrope/Absyn/Encoding.class com/biosimilarity/reflection/model/paratrope/Absyn/Formals.class com/biosimilarity/reflection/model/paratrope/Absyn/Obligation.class com/biosimilarity/reflection/model/paratrope/Absyn/Actuals.class com/biosimilarity/reflection/model/paratrope/Absyn/Remittance.class com/biosimilarity/reflection/model/paratrope/Absyn/ProcessExprPlus.class com/biosimilarity/reflection/model/paratrope/Absyn/Value.class com/biosimilarity/reflection/model/paratrope/Absyn/Variable.class com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExprPlus.class com/biosimilarity/reflection/model/paratrope/Absyn/ListProcessExpr.class com/biosimilarity/reflection/model/paratrope/Absyn/ListNominal.class
	 rm -f com/biosimilarity/reflection/model/paratrope/Absyn/*.class
	 rmdir com/biosimilarity/reflection/model/paratrope/Absyn/
	 rm -f paratrope.tex paratrope.dvi paratrope.aux paratrope.log paratrope.ps 
	 rm -f com/biosimilarity/reflection/model/paratrope/Yylex com/biosimilarity/reflection/model/paratrope/paratrope.cup com/biosimilarity/reflection/model/paratrope/Yylex.java com/biosimilarity/reflection/model/paratrope/VisitSkel.java com/biosimilarity/reflection/model/paratrope/ComposVisitor.java com/biosimilarity/reflection/model/paratrope/AbstractVisitor.java com/biosimilarity/reflection/model/paratrope/FoldVisitor.java com/biosimilarity/reflection/model/paratrope/AllVisitor.java com/biosimilarity/reflection/model/paratrope/PrettyPrinter.java com/biosimilarity/reflection/model/paratrope/Skeleton.java com/biosimilarity/reflection/model/paratrope/Test.java com/biosimilarity/reflection/model/paratrope/sym.java com/biosimilarity/reflection/model/paratrope/parser.java com/biosimilarity/reflection/model/paratrope/*.class
	 rm -f Makefile
	 rmdir -p com/biosimilarity/reflection/model/paratrope/

